package com.lhf.userservice.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lhf.userservice.entity.FvsSysPer;
import com.lhf.userservice.vo.FvsSysPerVO;
import com.lhf.userservice.vo.PerCascaderVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 权限(FvsSysPer)表数据库访问层
 *
 * @author liuhf
 * @since 2021-03-29 16:02:05
 */
public interface FvsSysPerDao extends BaseMapper<FvsSysPer> {

    /**
     * 查询权限列表
     *
     * @param page
     * @return
     */
    Page<FvsSysPerVO> selectAll(Page<FvsSysPer> page, @Param("per") FvsSysPer sysPer);

    /**
     * 查询角色所有权限
     *
     * @param rid
     * @return
     */
    List<FvsSysPerVO> findPerByRid(Long rid);

    /**
     * 查询用户权限菜单
     *
     * @param uid
     * @return
     */
    List<FvsSysPerVO> findPerByUid(@Param("uid") Long uid, @Param("parentId") Long parentId);



    /**
     * 查询权限级联选择器
     *
     * @param parent
     * @return
     */
    List<PerCascaderVo> findPerCascaderByParent(Long parent);
}
